from django.db import models


# Create your models here.

class Course(models.Model):
    course_name = models.CharField(max_length=100, unique=True, verbose_name="课程名字")
    course_no = models.CharField(max_length=100, unique=True, verbose_name="课程编号")
    course_time = models.CharField(max_length=100, verbose_name="课时")
    course_state = models.SmallIntegerField(choices=((1, "正常"), (0, "停课")), default=1, verbose_name="课程状态")
    create_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")

    class Meta:
        db_table = 'course'
